

import HrPubCommon from '../../../../hrpub/common/actions';

export default class CommonAction extends HrPubCommon {

    constructor(comp) {
        super(comp);
    }

    // 通用关闭弹窗
    closeModal = (field) => {
        return () => {
            this.update({
                [field]: false
            });
        }
    }

    // 本节点更新
    update = async (obj) => {
        const {props} = this.comp;
        const {dispatch} = props;

        await dispatch({
            type: 'emp/update',
            payload: obj
        });
    }
}